﻿using System;
using System.Configuration;

namespace Yz.Base
{
    public class CacheConfig
    {
        #region 缓存配置

        /// <summary>
        /// 缓存连接地址
        /// </summary>
        public static string RedisConnStr => ConfigurationManager.ConnectionStrings["RedisConnStr"].ConnectionString;

        /// <summary>
        /// 缓存key值前缀
        /// </summary>
        public static string CachePrefixName => ConfigurationManager.AppSettings["CachePrefixName"];

        /// <summary>
        /// unifyToken所在缓存的dbNum
        /// </summary>
        public static int CacheTokenDbNum => Convert.ToInt32(ConfigurationManager.AppSettings["CacheTokenDbNum"]);
        #endregion 缓存配置
    }
}
